<?php

namespace App\Http\Controllers\Admin;

use App\Image;
use Illuminate\Http\Request;
use App\Http\Controllers\Api\Controller;
use Illuminate\Support\Facades\Storage;

class ImageController extends Base
{
    public function upload(Request $request)
    {
        $path= $request->file->store('public/images');
        $map['url'] = Storage::url($path);
        $rew = Image::create($map);
        return $rew;
    }
}
